package com.online.websocketcluster.service;

import com.online.websocketcluster.service.impl.FindAgentServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

/**
 *   查找坐席、待接入顾客服务
 *   @author hsc
 *   @create 2018-05-07 09:35
 */
@FeignClient(name="find-agent-server",fallback= FindAgentServiceImpl.class)
public interface FindAgentService {

    /**
     * 查找待接入顾客
     * @param map (openId ,eId 企业id)
     * @return
     */
    @PostMapping(path = "/findWaitUser")
    Map findWaitUser(@RequestBody Map map);

    /**
     * 坐席关闭与顾客的聊天会话
     * @param map (service_id 坐席ID ,session_objs 会话对象集合)
     * @return
     */
    @PostMapping(value="/closeChatSession")
    Map closeChatSession(@RequestBody Map map);

}
